added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / CSASPNETMVCFileDownload / Controllers / HomeController.cs
blob66695ade02804c168ea91c3c89c176d05e40f4ff
1 /****************************** Module Header ******************************\
2 Module Name: HomeController.cs
3 Project: CSASPNETMVCFileDownload
4 Copyright (c) Microsoft Corporation.
6 The CSASPNETMVCFileDownload example demonstrates how to use C# codes to
7 create an ASP.NET MVC FileDownload application. The applicatino supports
8 basic site navigation, explore files in a certain fileshare and allow
9 client user to download a selected file among the file list.
11 This source is subject to the Microsoft Public License.
12 See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
13 All other rights reserved.
15 THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
16 EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
17 WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
18 \***************************************************************************/
20 using System;
21 using System.Collections.Generic;
22 using System.Linq;
23 using System.Web;
24 using System.Web.Mvc;
26 namespace CSASPNETMVCFileDownload.Controllers
28 [HandleError]
29 public class HomeController : Controller
31 // Action for Index request
32 public ActionResult Index()
34 ViewData["Message"] = "Welcome to ASP.NET MVC File Download Sample!";
36 return View();
39 // Action for About request
40 public ActionResult About()
42 return View();